package com.bank.domain;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "accounts")
public class Account implements Serializable {

	private static final long serialVersionUID = 5924361831551833717L;
	
	@Id
	@Column(name = "ACCOUNT_ID")
	@GeneratedValue
	private Integer accountId;
	
	private AccountTypes AccountTypes;
	
	private Currency Currency;
	
	@Column(name = "ACCOUNT_TYPE_ID")
	private Integer accountTypeId;

	@Column(name = "ACCOUNT_HASH")
	private String accountHash;

	@Column(name = "CURRENCY_ID")
	private Integer currencyId;
	
	@Column(name = "ACCOUNT_IDENTITY")
	private String accountIdentity;
	
	@Column(name = "AMOUNT")
	private Double amount;

	@Column(name = "CREATED_AT")
	private Date createdAt;

	@Column(name = "UPDATED_AT")
	private Date updatedAt;
	
	@ManyToOne(cascade = CascadeType.ALL)
	public AccountTypes getAccountName() {
		return AccountTypes;
	}
	public void SetAccountTypes(AccountTypes AccountTypes) {
		this.AccountTypes = AccountTypes;
	}
	
	@ManyToOne(cascade = CascadeType.ALL)
	public Currency getCurrency() {
		return Currency;
	}
	public void setCurrency(Currency Currency) {
		this.Currency = Currency;
	}
	
	/**
	 * @return the accountId
	 */
	public Integer getAccountId() {
		return accountId;
	}

	/**
	 * @param accountId the accountId to set
	 */
	public void setAccountId(Integer accountId) {
		this.accountId = accountId;
	}

	/**
	 * @return the accountTypeId
	 */
	public Integer getAccountTypeId() {
		return accountTypeId;
	}

	/**
	 * @param accountTypeId the accountTypeId to set
	 */
	public void setAccountTypeId(Integer accountTypeId) {
		this.accountTypeId = accountTypeId;
	}

	/**
	 * @return the accountHash
	 */
	public String getAccountHash() {
		return accountHash;
	}

	/**
	 * @param accountHash the accountHash to set
	 */
	public void setAccountHash(String accountHash) {
		this.accountHash = accountHash;
	}

	/**
	 * @return the currencyId
	 */
	public Integer getCurrencyId() {
		return currencyId;
	}

	/**
	 * @param currencyId the currencyId to set
	 */
	public void setCurrencyId(Integer currencyId) {
		this.currencyId = currencyId;
	}

	/**
	 * @return the accountIdentity
	 */
	public String getAccountIdentity() {
		return accountIdentity;
	}

	/**
	 * @param accountIdentity the accountIdentity to set
	 */
	public void setAccountIdentity(String accountIdentity) {
		this.accountIdentity = accountIdentity;
	}

	/**
	 * @return the amount
	 */
	public Double getAmount() {
		return amount;
	}

	/**
	 * @param amount the amount to set
	 */
	public void setAmount(Double amount) {
		this.amount = amount;
	}

	/**
	 * @return the serialversionuid
	 */
	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	/**
	 * @return the accountTypes
	 */
	public AccountTypes getAccountTypes() {
		return AccountTypes;
	}
	/**
	 * @param accountTypes the accountTypes to set
	 */
	public void setAccountTypes(AccountTypes accountTypes) {
		AccountTypes = accountTypes;
	}
	/**
	 * @return the createdAt
	 */
	public Date getCreatedAt() {
		return createdAt;
	}
	/**
	 * @param createdAt the createdAt to set
	 */
	public void setCreatedAt(Date createdAt) {
		this.createdAt = createdAt;
	}
	/**
	 * @return the updatedAt
	 */
	public Date getUpdatedAt() {
		return updatedAt;
	}
	/**
	 * @param updatedAt the updatedAt to set
	 */
	public void setUpdatedAt(Date updatedAt) {
		this.updatedAt = updatedAt;
	}



	

	
	
}
